package com.southwind.mapper;

import com.southwind.entity.BusCustomer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.southwind.vo.StatVO;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-05-28
 */
public interface BusCustomerMapper extends BaseMapper<BusCustomer> {
    @Select({"select count(identity) value ,address name from bus_customer group by address"})
    public List<StatVO> areaStat();

    @Select({"select custname from bus_customer where identity = #{identity} "})
    public String getNameByIdentity(String identity);

    @Select({"select sex name,count(sex) value from bus_customer where address = #{area}  group by sex"})
    public List<StatVO> sexStat(String area);
}
